package com.authine.cloudpivot.ext.Enum;

import com.authine.cloudpivot.ext.dto.model.contract.ContractServiceFeeTemplate;

import java.math.BigDecimal;
import java.util.function.Function;

/**
 * 代购服务费计算公式变量
 */

public enum ContractServiceFeeVariableEnum {
    /**
     * 代购服务费计算公式变量
     */
    PAYMENT_AMOUNT("付款金额", ContractServiceFeeTemplate::getAmount),
    ANNUALIZED_RATIO("年比例", ContractServiceFeeTemplate::getAnnualized_ratio),
    DAYS("天数", ContractServiceFeeTemplate::getDays),
    OTHER_RATIO("其它比例", ContractServiceFeeTemplate::getOther_ratio),
    YEAR_DAYS("年天数", ContractServiceFeeTemplate::getYear_days),

    ;

    public String des;
    public Function<ContractServiceFeeTemplate, BigDecimal> variable;

    ContractServiceFeeVariableEnum(String des, Function<ContractServiceFeeTemplate, BigDecimal> variable) {
        this.des = des;
        this.variable = variable;
    }
}
